﻿using LeanCloud;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

public class DeleteClick : MonoBehaviour
{

    // Use this for initialization
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {

    }

    public void Click()
    {
        Async();
        Debug.Log(123);
    }

    async System.Threading.Tasks.Task Async()
    {
        AVClient.Initialize("bKNobM2wmMsD7ReQ1f2Py91W-gzGzoHsz", "zudIgpWooM5QChpsT4E1yAAY", "https://bknobm2w.lc-cn-n1-shared.com");

        AVQuery<AVObject> query = new AVQuery<AVObject>("GameEquipBag");
        fuzhi fz = GetComponentInParent<fuzhi>();
        AVObject equipment = await query.GetAsync(fz.getID());

        
        AVClient.HttpLog(Debug.Log);

        await equipment.DeleteAsync();
    }
}
